﻿<%@ Control Language="VB" AutoEventWireup="false" CodeFile="Cotitulares.ascx.vb"
    Inherits="Content_Administracion_Adm_controls_Cotitulares" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>

<br />
<div class="titulos">
    <asp:Label ID="lbl_headerCot" runat="server" Text="Administración de Cotitulares"></asp:Label>
</div>
<br />
<center>
</center>
<br />
<asp:UpdatePanel ID="UpdatePanel2" runat="server" >
    <ContentTemplate>
<div id="Div2" class="divContent" runat="server" >
    <center>
        <table style="width: 50%;">
            <tr>
                <td rowspan="17" style="width: 35%">
                    <asp:GridView ID="gv_Cotitulares" runat="server" AutoGenerateColumns="False" AllowPaging="True"
                        PageSize="8" PagerStyle-CssClass="PagerColor" CssClass="Gridview" HeaderStyle-CssClass="HeaderFooterGridview"
                        FooterStyle-CssClass="HeaderFooterGridview" CellPadding="5" GridLines="None" Width="100%"
                        AlternatingRowStyle-CssClass="GridviewAlt">
                        <Columns>
                            <asp:TemplateField ShowHeader="False">
                                <ItemTemplate>
                                    <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="editarCot"
                                        Text="Editar" CommandArgument='<%# Bind("cot_id") %>'></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField ShowHeader="False">
                                <ItemTemplate>
                                    <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="eliminarCot"
                                        Text="Eliminar" CommandArgument='<%# Bind("cot_id") %>'></asp:LinkButton>
                                    <asp:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" TargetControlID="LinkButton2"
                                        ConfirmText="¿Estas seguro de eliminar el registro?">
                                    </asp:ConfirmButtonExtender>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="NombreCot" HeaderText="NOMBRE" />
                            
                        </Columns>
                    </asp:GridView>
                </td>
                <td rowspan="17" style="width: 10%">
                </td>
                <td>
                    <asp:Label ID="Label33" runat="server" Text="Nombre: " Visible="True"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="nomCot" runat="server" Visible="true" ValidationGroup="g1" MaxLength="45"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1"  runat="server"
                        Display="None" ControlToValidate="nomCot" ErrorMessage="Campo obligatorio" ForeColor="Red"
                        ValidationGroup="g1"></asp:RequiredFieldValidator>
                    <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" CloseImageUrl="~/images/close.gif"
                        CssClass="validatorCallout" HighlightCssClass="validatorCalloutHighlight" TargetControlID="RequiredFieldValidator1"
                        WarningIconImageUrl="~/images/Warning.png" Enabled="True" />
                         <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" FilterType="LowercaseLetters,UppercaseLetters,Custom"
                            ValidChars=" .ñÑáéíóúÁÉÍÓÚ" TargetControlID="nomCot">
                        </asp:FilteredTextBoxExtender>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label34" runat="server" Text="Apellido Paterno: " Visible="True"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="apCot" runat="server" Visible="True" ValidationGroup="g1" MaxLength="45"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" ValidationGroup="g1" 
                        runat="server" Display="None" ControlToValidate="apCot" ErrorMessage="Campo obligatorio"
                        ForeColor="Red"></asp:RequiredFieldValidator>
                    <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" CloseImageUrl="~/images/close.gif"
                        CssClass="validatorCallout" HighlightCssClass="validatorCalloutHighlight" TargetControlID="RequiredFieldValidator2"
                        WarningIconImageUrl="~/images/Warning.png" Enabled="True" />
                        <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" FilterType="LowercaseLetters,UppercaseLetters,Custom"
                            ValidChars=" .ñÑáéíóúÁÉÍÓÚ" TargetControlID="apCot">
                        </asp:FilteredTextBoxExtender>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label35" runat="server" Text="Apellido Materno: " Visible="True"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="amCot" runat="server" Visible="True" ValidationGroup="g1" MaxLength="45"></asp:TextBox>
                     <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" runat="server" FilterType="LowercaseLetters,UppercaseLetters,Custom"
                            ValidChars=" .ñÑáéíóúÁÉÍÓÚ" TargetControlID="amCot">
                        </asp:FilteredTextBoxExtender>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label37" runat="server" Text="Fecha de nacimiento: " Visible="True"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="fechaNacCot" runat="server" Visible="True" ValidationGroup="g1"></asp:TextBox>
                    <asp:ImageButton ID="img_cal2" runat="server" ImageUrl="~/images/calendar.gif" />
                    <asp:CalendarExtender ID="CalendarExtender1" runat="server" Enabled="True" Format="yyyy-MM-dd"
                        PopupButtonID="img_cal2" TargetControlID="fechaNacCot"></asp:CalendarExtender>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" ValidationGroup="g1" 
                        runat="server" Display="None" ControlToValidate="fechaNacCot" ErrorMessage="Campo obligatorio"
                        ForeColor="Red"></asp:RequiredFieldValidator>
                    <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" CloseImageUrl="~/images/close.gif"
                        CssClass="validatorCallout" HighlightCssClass="validatorCalloutHighlight" TargetControlID="RequiredFieldValidator4"
                        WarningIconImageUrl="~/images/Warning.png" Enabled="True" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label49" runat="server" Text="RFC: " Visible="True"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="rfcCot" runat="server" Visible="True" ValidationGroup="g1" MaxLength="13"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ErrorMessage="Formato Incorrecto"
                        Display="None" ValidationExpression="[A-Z]{4}[0-9]{6}[A-Z0-9]{3}" ForeColor="Red" ValidationGroup="g1"
                        ControlToValidate="rfcCot"> </asp:RegularExpressionValidator>
                    <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server" CloseImageUrl="~/images/close.gif"
                        CssClass="validatorCallout" HighlightCssClass="validatorCalloutHighlight" TargetControlID="RegularExpressionValidator2"
                        WarningIconImageUrl="~/images/Warning.png" Enabled="True" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label51" runat="server" Text="CURP: " Visible="True"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="curpCot" runat="server" Visible="True" ValidationGroup="g1" MaxLength="18"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator11" runat="server"
                            ControlToValidate="curpCot" Display="None" ErrorMessage="Curp Incorrecto" ForeColor="Red"
                            ValidationGroup="g1" ValidationExpression="^[a-zA-Z]{4}((\d{2}((0[13578]|1[02])(0[1-9]|[12]\d|3[01])|(0[13456789]|1[012])(0[1-9]|[12]\d|30)|02(0[1-9]|1\d|2[0-8])))|([02468][048]|[13579][26])0229)(H|M)(AS|BC|BS|CC|CL|CM|CS|CH|DF|DG|GT|GR|HG|JC|MC|MN|MS|NT|NL|OC|PL|QT|QR|SP|SL|SR|TC|TS|TL|VZ|YN|ZS|SM|NE)([a-zA-Z]{3})([a-zA-Z0-9\s]{1})\d{1}$+">
                        </asp:RegularExpressionValidator>
                        <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender83" runat="server" CloseImageUrl="~/images/close.gif"
                            CssClass="validatorCallout" Enabled="True" HighlightCssClass="validatorCalloutHighlight"
                            TargetControlID="RegularExpressionValidator11" WarningIconImageUrl="~/images/Warning.png" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label20" runat="server" Text="Calle: "></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="calleCli" runat="server" ValidationGroup="g1" MaxLength="80"></asp:TextBox>
                    <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender6" runat="server" FilterType="LowercaseLetters,UppercaseLetters,Custom,Numbers"
                        ValidChars=" .ñÑáéíóúÁÉÍÓÚ" TargetControlID="calleCli"> </asp:FilteredTextBoxExtender>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator26" runat="server" ControlToValidate="calleCli"
                        Display="None" ErrorMessage="Campo obligatorio" ForeColor="Red" ValidationGroup="g1"></asp:RequiredFieldValidator>
                    <asp:ValidatorCalloutExtender ID="RequiredFieldValidator26_ValidatorCalloutExtender"
                        runat="server" CloseImageUrl="~/images/close.gif" CssClass="validatorCallout"
                        Enabled="True" HighlightCssClass="validatorCalloutHighlight" TargetControlID="RequiredFieldValidator26"
                        WarningIconImageUrl="~/images/Warning.png" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label91" runat="server" Text="Número:"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txt_numero" runat="server" ValidationGroup="g1" MaxLength="20"></asp:TextBox>
                    <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender7" runat="server" FilterType="LowercaseLetters,Custom,Numbers,UppercaseLetters"
                            ValidChars=" -" TargetControlID="txt_numero"></asp:FilteredTextBoxExtender>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator24" runat="server" ControlToValidate="txt_numero"
                        Display="None" ErrorMessage="Campo obligatorio" ForeColor="Red" ValidationGroup="g1"></asp:RequiredFieldValidator>
                    <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender85" runat="server" CloseImageUrl="~/images/close.gif"
                        CssClass="validatorCallout" Enabled="True" HighlightCssClass="validatorCalloutHighlight"
                        TargetControlID="RequiredFieldValidator24" WarningIconImageUrl="~/images/Warning.png" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label92" runat="server" Text="Colonia:"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txt_colonia" runat="server" ValidationGroup="g1" MaxLength="45"></asp:TextBox>
                    <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender8" runat="server" FilterType="LowercaseLetters,UppercaseLetters,Custom,Numbers"
                        TargetControlID="txt_colonia" ValidChars=" .-ñÑáéíóúÁÉÍÓÚ"></asp:FilteredTextBoxExtender>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ControlToValidate="txt_colonia"
                        Display="None" ErrorMessage="Campo obligatorio" ForeColor="Red" ValidationGroup="g1"></asp:RequiredFieldValidator>
                    <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender84" runat="server" CloseImageUrl="~/images/close.gif"
                        CssClass="validatorCallout" Enabled="True" HighlightCssClass="validatorCalloutHighlight"
                        TargetControlID="RequiredFieldValidator9" WarningIconImageUrl="~/images/Warning.png" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label30" runat="server" Text="C.P.: "></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="cpCot" runat="server" ValidationGroup="g1" MaxLength="6"></asp:TextBox>
                    <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender5" runat="server" FilterType="Numbers"
                        TargetControlID="cpCot"></asp:FilteredTextBoxExtender>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator27" runat="server" ControlToValidate="cpCot"
                        Display="None" ErrorMessage="Campo obligatorio" ForeColor="Red" ValidationGroup="g1"></asp:RequiredFieldValidator>
                    <asp:ValidatorCalloutExtender ID="RequiredFieldValidator27_ValidatorCalloutExtender"
                        runat="server" CloseImageUrl="~/images/close.gif" CssClass="validatorCallout"
                        Enabled="True" HighlightCssClass="validatorCalloutHighlight" TargetControlID="RequiredFieldValidator27"
                        WarningIconImageUrl="~/images/Warning.png" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label93" runat="server" Text="País:"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txt_pais" runat="server" ValidationGroup="g1" MaxLength="45"></asp:TextBox>
                    <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender9" runat="server" FilterType="LowercaseLetters,UppercaseLetters,Custom"
                        ValidChars=" .ñÑáéíóúÁÉÍÓÚ" TargetControlID="txt_pais"></asp:FilteredTextBoxExtender>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator25" runat="server" ControlToValidate="txt_pais"
                        Display="None" ErrorMessage="Campo obligatorio" ForeColor="Red" ValidationGroup="g1"></asp:RequiredFieldValidator>
                    <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender86" runat="server" CloseImageUrl="~/images/close.gif"
                        CssClass="validatorCallout" Enabled="True" HighlightCssClass="validatorCalloutHighlight"
                        TargetControlID="RequiredFieldValidator25" WarningIconImageUrl="~/images/Warning.png" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label32" runat="server" Text="Estado: "></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="edocot" runat="server" ValidationGroup="g1" MaxLength="45"></asp:TextBox>
                      <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender10" runat="server" FilterType="LowercaseLetters,UppercaseLetters,Custom"
                        ValidChars=" .ñÑáéíóúÁÉÍÓÚ" TargetControlID="edocot">
                    </asp:FilteredTextBoxExtender>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator28" runat="server" ControlToValidate="edocot"
                        Display="None" ErrorMessage="Campo obligatorio" ForeColor="Red" ValidationGroup="g1"></asp:RequiredFieldValidator>
                    <asp:ValidatorCalloutExtender ID="RequiredFieldValidator28_ValidatorCalloutExtender"
                        runat="server" CloseImageUrl="~/images/close.gif" CssClass="validatorCallout"
                        Enabled="True" HighlightCssClass="validatorCalloutHighlight" TargetControlID="RequiredFieldValidator28"
                        WarningIconImageUrl="~/images/Warning.png" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label31" runat="server" Text="Ciudad: "></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="munCot" runat="server" ValidationGroup="g1" MaxLength="45"></asp:TextBox>
                       <asp:FilteredTextBoxExtender ID="munCli_FilteredTextBoxExtender" runat="server" FilterType="LowercaseLetters,UppercaseLetters,Custom"
                        TargetControlID="munCot" ValidChars=" .ñÑáéíóúÁÉÍÓÚ">
                    </asp:FilteredTextBoxExtender>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator29" runat="server" ControlToValidate="munCot"
                        Display="None" ErrorMessage="Campo obligatorio" ForeColor="Red" ValidationGroup="g1"></asp:RequiredFieldValidator>
                    <asp:ValidatorCalloutExtender ID="RequiredFieldValidator29_ValidatorCalloutExtender"
                        runat="server" CloseImageUrl="~/images/close.gif" CssClass="validatorCallout"
                        Enabled="True" HighlightCssClass="validatorCalloutHighlight" TargetControlID="RequiredFieldValidator29"
                        WarningIconImageUrl="~/images/Warning.png" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label56" runat="server" Text="Teléfono: " Visible="True"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="telCot" runat="server" Visible="True" ValidationGroup="g1" MaxLength="20"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator11"  runat="server"
                        Display="None" ControlToValidate="telCot" ErrorMessage="Campo obligatorio" ForeColor="Red"
                        ValidationGroup="g1"></asp:RequiredFieldValidator>
                    <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender12" runat="server" CloseImageUrl="~/images/close.gif"
                        CssClass="validatorCallout" HighlightCssClass="validatorCalloutHighlight" TargetControlID="RequiredFieldValidator11"
                        WarningIconImageUrl="~/images/Warning.png" Enabled="True" />
                         <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender11" runat="server" FilterType="Numbers"
                            TargetControlID="telCot"/>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label57" runat="server" Text="Celular: " Visible="True"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="celCot" runat="server" Visible="True" ValidationGroup="g1" MaxLength="20"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator6"  runat="server"
                        Display="None" ControlToValidate="celCot" ErrorMessage="Campo obligatorio" ForeColor="Red"
                        ValidationGroup="g1"></asp:RequiredFieldValidator>
                    <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender18" runat="server" CloseImageUrl="~/images/close.gif"
                        CssClass="validatorCallout" HighlightCssClass="validatorCalloutHighlight" TargetControlID="RequiredFieldValidator6"
                        WarningIconImageUrl="~/images/Warning.png" Enabled="True" />
                        <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" FilterType="Numbers"
                            TargetControlID="celCot"/>
                </td>
            </tr>
            <tr>
                <td colspan="2" align="center">
                    <br />
                     <asp:Button ID="btnInsertaCot" runat="server" CssClass="button2" Text="Insertar" Visible="True" ValidationGroup="g1" />
                    <asp:Button ID="btnModificarCot" runat="server" CssClass="button2" Text="Modificar" Visible="false" ValidationGroup="g1"/>
                    <asp:Button ID="bntCancelarCot" runat="server" CssClass="button2" Text="Cancelar" CausesValidation="false" />
                    <br />
                    <asp:Label ID="lb_error" runat="server" Text="" ForeColor="Red"></asp:Label>
                    <br />
                </td>
            </tr>
            
        </table>
        <br />
    </center>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<br />
<div style="width: 90%; margin-left: auto; margin-right: auto; padding-bottom: 15px;
    padding-left: 15px; padding-top: 15px; overflow: hidden;">
    <center>
        <table style="width: 100%;">
            <tr>
                <td align="left">
                    <asp:Button ID="btnRegresar" runat="server" CssClass="button2" Text="Regresar" /></td>
                <td align="right">
                   <asp:Button ID="btnSiguiente2" runat="server" CssClass="button2" Text="Siguiente" 
                        Height="26px" />
                </td>
            </tr>
        </table>
    </center>
</div>

<br />
<br />